<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
%>

<jsp:include page="/comm/header.jsp"></jsp:include>
 <div class="clear"></div>
<!--第1部分开始  --> 
    <div class="wrap1">
    	<div class="blank1"></div>
        
<!--选项卡开始--> 	
<div id="mainTabbox">
<jsp:include page="../tabboxhead3.jsp"/>
 	<div id="conten">
 		<div class="tab_show" id="con_tabmy_1">
  
<jsp:include page="left.jsp"></jsp:include>
<div class="wrap_left">
	<div class="wrap_m2">
    
	   <div class="wrap_m2_cont">
       
        	<jsp:include page="top.jsp"></jsp:include>

 
       </div>
         <div class="blank1"></div>
            <div class="my04_tt">已完成的交易</div>
       
                <div class="trading_box">
                	<s:if test="totalSize == 0">
                		暂无交易信息
                	</s:if>
					<s:else>
                        <table class="trading_tab">
		    				<tr>
								<th class="trading_th1">名称</th>
								<th class="trading_th2">价格</th>
								<th class="trading_th3">佣金</th>
								<th class="trading_th4">交易时间</th>
								<th class="trading_th5">状态</th>
								<th class="trading_th6">操作</th>
		   					</tr>
		   					<s:iterator value="orders" id="order">
		   						<s:iterator value="orderDetails" status="st">
		   							<tr>
		   								<td class="trading_td1"><a href="canBuyDetail.htm?id=<s:property value='productId' />" target="_blank"><s:property value="goodsName" /></a></td>
		   								<td class="trading_td2">￥<s:property value="price" /></td>
		   								<td class="trading_td3">￥<s:property value="serviceFee" /></td>
		   								<s:if test="#st.index == 0">
		   									<td class="trading_td4" rowspan="<s:property value='orderDetails.size' />"><s:date name="#order.startTime" format="yyyy-MM-dd" /></td>
		   									<td class="trading_td5" rowspan="<s:property value='orderDetails.size' />"><span class="span_state">
		   										交易完成</span><br/>
		   										<a href="<%=path %>/order.htm?tid=<s:property value='transId' />&userType=1" target="_blank"><span class="span_broker">订单详情</span></a>
		   									</td>
		   									<td class="trading_td6" rowspan="<s:property value='orderDetails.size' />">
		   										<s:if test="brokerEvaluation == 1">
	                       	 						<a href="javascript:doEvaluate('<s:property value='transId' />');"><span class="span_broker">评价</span></a>
	                       	 					</s:if>
		   									</td> 
		   								</s:if>
		   							</tr>
		   						</s:iterator>
		   					</s:iterator>
						</table>
                   	</s:else>
				   	<div class="clear"></div>
                </div>
                <!--页码开始-->
		<div class="page_box">
			<div class="pagewrap">
				<div class="page" id="page">
					<s:if test="totalSize > 0">
						<ul>
							<s:if test="superPage == 1">
								<li>首页</li>
								<li>上一页</li>
							</s:if>
							<s:else>
								<s:url id="firstPage" action="initBTradedInfo">
									<s:param name="superPage" value="1" />
									<s:param name="brokerEvaluation" value="brokerEvaluation" />
								</s:url>
								<s:url id="prevPage" action="initBTradedInfo">
									<s:param name="superPage" value="superPage - 1" />
									<s:param name="brokerEvaluation" value="brokerEvaluation" />
								</s:url>
								<li><s:a href="%{firstPage}">首页</s:a></li>
								<li><s:a href="%{prevPage}">上一页</s:a></li>
							</s:else>
							<s:iterator value="pageList" status="st">
								<s:if test="pageNumber == '...'">
									<li><s:property value='pageNumber' /></li>
								</s:if>
								<s:elseif test="choose">
									<li class="thisclass"><s:property value='pageNumber' /></li>
								</s:elseif>
								<s:else>
									<s:url id="page#st.index" action="initBTradedInfo">
										<s:param name="superPage" value="pageNumber" />
										<s:param name="brokerEvaluation" value="brokerEvaluation" />
									</s:url>
									<li><s:a href="%{page#st.index}"><s:property value='pageNumber' /></s:a></li>
								</s:else>
							</s:iterator>
							<s:if test="superPage == totalPage">
								<li>下一页</li>
								<li>末页</li>
							</s:if>
							<s:else>
								<s:url id="nextPage" action="initBTradedInfo">
									<s:param name="superPage" value="superPage+1" />
									<s:param name="brokerEvaluation" value="brokerEvaluation" />
								</s:url>
								<s:url id="lastPage" action="initBTradedInfo">
									<s:param name="superPage" value="totalPage" />
									<s:param name="brokerEvaluation" value="brokerEvaluation" />
								</s:url>
								<li><s:a href="%{nextPage}">下一页</s:a></li>
								<li><s:a href="%{lastPage}">末页</s:a></li>
							</s:else>
							<li><span class="pageinfo">共 <strong><s:property value='totalPage' /></strong>页<strong><s:property value='totalSize' /></strong>条
							</span></li>
							<div class="clear"></div>
						</ul>
					</s:if>

				</div>
			</div>

		</div>
		<!--页码结束 -->
             


       
       </div>

    
    </div>
</div>
<div class="clear"></div>
        
        <!--内容结束-->

 		</div>
 	
 	</div>
 </div>
<!--选项卡结束-->         
             
      </div>

    </div>

<jsp:include page="/comm/bottom.jsp"></jsp:include>
</body>
</html>

<div class="pbox_dgc pbox_pingjia" id="pbox_dgc">
        
         <div class="wrap_right_dgc">
             <p><a href="javascript:closeDiv()">&nbsp;&nbsp;&nbsp;</a></p>
    	 </div>
         
         <div class="wrap_left_dgc">   
         		<s:form id="evaluate" action="evaluate" method="post">
         		<input type="hidden" name="tid" id="transId" />
         		<input type="hidden" name="userType" value="1" />
         		<s:hidden name="brokerEvaluation" />
         		<dl>
              		
              		<dd>
              			评分：
              			<input type="radio" name="evaluateModel.level" value="1" checked />好评&nbsp;
              			<input type="radio" name="evaluateModel.level" value="2"/>中评&nbsp;
              			<input type="radio" name="evaluateModel.level" value="3"/>差评</dd>
              		<dd>
              			内容：<s:textfield id="info" name="evaluateModel.info" cssClass="input1" />
              		</dd>
              		<dd class="end1"><a href='javascript:$("#evaluate").submit();'>提交</a></dd>
           		</dl>
         		</s:form>
         </div>
        
        </div>
        <div id="fixbg_dgc" class="fixbg_dgc" style="display:none;">			
</div>
<script type="text/javascript">
function showDiv(){
	document.getElementById('pbox_dgc').style.display='block';
	document.getElementById('fixbg_dgc').style.display='block';
}

function closeDiv(){
	document.getElementById('pbox_dgc').style.display='none';
	document.getElementById('fixbg_dgc').style.display='none';
}

function doEvaluate(transId) {
	$("#transId").val(transId);
	showDiv();
}
</script>